<!DOCTYPE HTML>
<html lang="en" >
    <!-- Start book Git简介 -->
    <head>
        <!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>Debug分支 | Git简介</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../4.html" />
    
    
    <link rel="prev" href="../part3/10.html" />
    

        <!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
        
    <div class="book"
        data-level="3.10"
        data-chapter-title="Debug分支"
        data-filepath="part3/11.md"
        data-basepath=".."
        data-revision="Fri Sep 08 2017 10:45:34 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        GIT简介
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="1.html">
            
                
                    <a href="../1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        安装配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2" data-path="part2/1.html">
            
                
                    <a href="../part2/1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        经理-创建
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="part2/2.html">
            
                
                    <a href="../part2/2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        创建仓库
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="part2/3.html">
            
                
                    <a href="../part2/3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        添加ssh账户
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="part2/4.html">
            
                
                    <a href="../part2/4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        克隆项目
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="part2/5.html">
            
                
                    <a href="../part2/5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        创建项目分支
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="part2/6.html">
            
                
                    <a href="../part2/6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        搭建项目框架
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="part2/7.html">
            
                
                    <a href="../part2/7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        上传分支
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="part3/1.html">
            
                
                    <a href="../part3/1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        员工-开发
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="part3/2.html">
            
                
                    <a href="../part3/2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        添加ssh账户
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="part3/3.html">
            
                
                    <a href="../part3/3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        本地克隆
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="part3/4.html">
            
                
                    <a href="../part3/4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        同步分支
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="part3/5.html">
            
                
                    <a href="../part3/5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        开发管理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="part3/6.html">
            
                
                    <a href="../part3/6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        工作区与暂存区
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="part3/7.html">
            
                
                    <a href="../part3/7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        暂存区与仓库区
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="part3/8.html">
            
                
                    <a href="../part3/8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        本地与服务器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="part3/9.html">
            
                
                    <a href="../part3/9.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        历史
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="part3/10.html">
            
                
                    <a href="../part3/10.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        删除
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="3.10" data-path="part3/11.html">
            
                
                    <a href="../part3/11.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.</b>
                        
                        Debug分支
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="4.html">
            
                
                    <a href="../4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        经理-发布
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5" data-path="5.html">
            
                
                    <a href="../5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        总结与作业
                    </a>
            
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >Git简介</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="debug&#x5206;&#x652F;">Debug&#x5206;&#x652F;</h1>
<ul>
<li>&#x5728;&#x9879;&#x76EE;&#x7684;&#x6B63;&#x5E38;&#x5F00;&#x53D1;&#x8FC7;&#x7A0B;&#x4E2D;&#xFF0C;&#x4E4B;&#x524D;&#x53D1;&#x5E03;&#x8FC7;&#x7684;&#x7248;&#x672C;&#x53EF;&#x80FD;&#x5F88;&#x4F1A;&#x51FA;bug&#xFF0C;&#x8FD9;&#x65F6;&#x5C31;&#x9700;&#x8981;&#x505C;&#x4E0B;&#x6765;&#x73B0;&#x5728;&#x7684;&#x5F00;&#x53D1;&#x4EFB;&#x52A1;&#xFF0C;&#x5148;&#x53BB;&#x4FEE;&#x6539;bug&#xFF0C;&#x5B8C;&#x6210;&#x540E;&#x518D;&#x56DE;&#x6765;&#x7EE7;&#x7EED;&#x5F00;&#x53D1;&#x4EFB;&#x52A1;</li>
<li>git&#x4E2D;stash&#x63D0;&#x4F9B;&#x4E86;&#x4FDD;&#x5B58;&#x73B0;&#x573A;&#x7684;&#x529F;&#x80FD;&#xFF0C;&#x53EF;&#x4EE5;&#x628A;&#x5F53;&#x524D;&#x5DE5;&#x4F5C;&#x533A;&#x3001;&#x6682;&#x5B58;&#x533A;&#x4E2D;&#x7684;&#x5185;&#x5BB9;&#x4E0D;&#x9700;&#x8981;&#x63D0;&#x4EA4;&#x800C;&#x4FDD;&#x5B58;&#x4E0B;&#x6765;&#xFF0C;&#x8F6C;&#x800C;&#x53BB;&#x505A;bug&#x4FEE;&#x590D;&#xFF0C;&#x5B8C;&#x6210;&#x540E;&#x518D;&#x6062;&#x590D;&#x73B0;&#x573A;&#xFF0C;&#x7EE7;&#x7EED;&#x5F00;&#x53D1;&#x5DE5;&#x4F5C;</li>
<li>&#x793A;&#x4F8B;&#x5982;&#x4E0B;&#xFF1A;&#x505C;&#x6B62;&#x5F53;&#x524D;&#x5DE5;&#x4F5C;&#xFF0C;&#x4FEE;&#x590D;master&#x5206;&#x652F;&#x4E0B;&#x7684;&#x4E00;&#x4E2A;bug&#xFF0C;&#x4E3A;&#x4FEE;&#x6539;dailyfresh/settings.py&#x6587;&#x4EF6;</li>
<li>&#x8BED;&#x8A00;&#x548C;&#x65F6;&#x533A;&#x7684;&#x539F;&#x5185;&#x5BB9;&#x4E3A;</li>
</ul>
<pre><code>LANGUAGE_CODE = &apos;en-us&apos;
TIME_ZONE = &apos;UTC&apos;
</code></pre><ul>
<li>&#x5C06;&#x8BED;&#x8A00;&#x548C;&#x65F6;&#x533A;&#x6539;&#x4E3A;</li>
</ul>
<pre><code>LANGUAGE_CODE = &apos;zh-Hans&apos;
TIME_ZONE = &apos;Shanghai/Asia&apos;
</code></pre><ul>
<li>1.&#x67E5;&#x770B;&#x5F53;&#x524D;&#x72B6;&#x6001;</li>
</ul>
<pre><code>git status
</code></pre><p><img src="images/part2_10_1.png" alt="&#x72B6;&#x6001;1"></p>
<ul>
<li>2.&#x4FDD;&#x5B58;&#x73B0;&#x573A;</li>
</ul>
<pre><code>git stash
</code></pre><p><img src="images/part2_10_3.png" alt="&#x4FDD;&#x5B58;&#x73B0;&#x573A;"></p>
<ul>
<li>&#x518D;&#x67E5;&#x770B;&#x5F53;&#x524D;&#x72B6;&#x6001;&#xFF0C;&#x53D1;&#x73B0;&#x662F;&#x5E72;&#x51C0;&#x7684;</li>
</ul>
<pre><code>git status
</code></pre><p><img src="images/part2_10_3.png" alt="&#x72B6;&#x6001;2"></p>
<ul>
<li>3.&#x5207;&#x6362;&#x5230;master&#x5206;&#x652F;</li>
</ul>
<pre><code>git checkout master
</code></pre><ul>
<li>4.&#x65B0;&#x5EFA;&#x4E34;&#x65F6;&#x5206;&#x652F;&#x7528;&#x4E8E;&#x4FEE;&#x590D;bug&#xFF0C;&#x7528;&#x5B8C;&#x540E;&#x4F1A;&#x5220;&#x9664;&#x6B64;&#x5206;&#x652F;</li>
</ul>
<pre><code>git checkout -b bug001
</code></pre><ul>
<li>5.&#x6309;&#x7167;&#x4E0A;&#x9762;&#x7684;&#x8BBE;&#x8BA1;&#xFF0C;&#x4FEE;&#x6539;dailyfresh/settings.py&#x6587;&#x4EF6;&#x7684;&#x8BED;&#x8A00;&#x548C;&#x65F6;&#x533A;&#x5982;&#x4E0B;</li>
</ul>
<pre><code>LANGUAGE_CODE = &apos;zh-Hans&apos;
TIME_ZONE = &apos;Shanghai/Asia&apos;
</code></pre><ul>
<li>&#x6DFB;&#x52A0;&#xFF1A;&#x5C06;&#x5DE5;&#x4F5C;&#x533A;&#x4E2D;&#x7684;&#x66F4;&#x6539;&#x6DFB;&#x52A0;&#x5230;&#x6682;&#x5B58;&#x533A;</li>
<li>&#x6CE8;&#x610F;&#xFF1A;&#x5F53;&#x524D;&#x76EE;&#x5F55;&#x4E3A;manage.py&#x6587;&#x4EF6;&#x6240;&#x5728;&#x76EE;&#x5F55;</li>
</ul>
<pre><code>(py_django) python@ubuntu:~/Desktop/pytest/django1/dailyfresh$ git add dailyfresh/settings.py
</code></pre><ul>
<li>&#x63D0;&#x4EA4;&#xFF1A;&#x5C06;&#x6682;&#x5B58;&#x533A;&#x7684;&#x5185;&#x5BB9;&#x63D0;&#x4EA4;&#x5230;&#x4ED3;&#x5E93;&#x533A;</li>
</ul>
<pre><code>git commit -m &apos;&#x4FEE;&#x590D;&#x65F6;&#x533A;&#x8BED;&#x8A00;&apos;
</code></pre><ul>
<li>6.&#x5207;&#x6362;&#x56DE;master&#x5206;&#x652F;</li>
</ul>
<pre><code>git checkout master
</code></pre><ul>
<li>7.&#x5C06;bug001&#x5206;&#x652F;&#x5408;&#x5E76;&#x5230;master&#x5206;&#x652F;</li>
<li>&#x56E0;&#x4E3A;&#x4E34;&#x65F6;&#x5206;&#x652F;&#x7528;&#x5B8C;&#x540E;&#x4F1A;&#x88AB;&#x5220;&#x9664;&#xFF0C;&#x65E0;&#x6CD5;&#x901A;&#x8FC7;&#x5206;&#x652F;&#x67E5;&#x8BE2;&#x5386;&#x53F2;&#x8BB0;&#x5F55;&#xFF0C;&#x6240;&#x4EE5;&#x4F7F;&#x7528;&#x4E34;&#x65F6;&#x5206;&#x652F;&#x65F6;&#x9700;&#x8981;&#x4F7F;&#x7528;no-ff&#x7684;&#x65B9;&#x5F0F;&#xFF0C;&#x540C;&#x65F6;&#x5199;&#x4E0A;-m&#x5907;&#x6CE8;&#x4FE1;&#x606F;</li>
</ul>
<pre><code>git merge --no-ff -m &quot;&#x4FEE;&#x590D;bug-&#x8BED;&#x8A00;&#x65F6;&#x533A;&quot; bug001
</code></pre><p><img src="images/part2_10_4.png" alt="&#x4FEE;&#x590D;&#x540E;&#x5408;&#x5E76;"></p>
<ul>
<li>&#x63A8;&#x9001;&#x5230;&#x670D;&#x52A1;&#x5668;</li>
</ul>
<pre><code>git push
</code></pre><ul>
<li>8.&#x5220;&#x9664;&#x4E34;&#x65F6;&#x5206;&#x652F;bug001</li>
</ul>
<pre><code>git branch -d bug001
</code></pre><p><img src="images/part2_10_5.png" alt="&#x5220;&#x9664;&#x5206;&#x652F;"></p>
<ul>
<li>9.&#x5207;&#x6362;&#x56DE;&#x5DE5;&#x4F5C;&#x5206;&#x652F;zhujiao</li>
</ul>
<pre><code>git checkout zhujiao
</code></pre><ul>
<li>&#x67E5;&#x770B;&#x73B0;&#x573A;&#x5217;&#x8868;</li>
</ul>
<pre><code>git stash list
</code></pre><p><img src="images/part2_10_6.png" alt="&#x6062;&#x590D;&#x73B0;&#x573A;"></p>
<ul>
<li>&#x6062;&#x590D;&#x73B0;&#x573A;</li>
</ul>
<pre><code>git stash pop
</code></pre><p><img src="images/part2_10_7.png" alt="&#x6062;&#x590D;&#x73B0;&#x573A;"></p>
<ul>
<li>&#x6062;&#x590D;&#x73B0;&#x573A;&#x540E;&#x67E5;&#x770B;&#x5DE5;&#x4F5C;&#x72B6;&#x6001;</li>
</ul>
<pre><code>git status
</code></pre><p><img src="images/part2_10_8.png" alt="&#x6062;&#x590D;&#x73B0;&#x573A;"></p>
<ul>
<li>&#x63A5;&#x4E0B;&#x6765;&#x53EF;&#x4EE5;&#x5728;&#x8FD9;&#x4E2A;&#x5206;&#x652F;&#x7EE7;&#x7EED;&#x5F00;&#x53D1;</li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../part3/10.html" class="navigation navigation-prev " aria-label="Previous page: 删除"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../4.html" class="navigation navigation-next " aria-label="Next page: 经理-发布"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"toggle-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
    </body>
    <!-- End of book Git简介 -->
</html>
